/*
 * PyErrors.cpp
 *
 *  Created on: 7 Feb 2012
 *      Author: allan
 */

#include "PyErrors.h"

// Boost includes
#include <boost/python.hpp>
using namespace boost::python;

void IndexError(std::string msg)
{
	PyErr_SetString(PyExc_IndexError, msg.c_str());
	throw_error_already_set();
}

void SliceStepError()
{
	PyErr_SetString(PyExc_IndexError, "slice step size not supported");
	throw_error_already_set();
}

void TypeError(std::string msg)
{
	PyErr_SetString(PyExc_TypeError, msg.c_str());
	throw_error_already_set();
}
